<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>示例</title>
</head>
<body>
    <div id="app">
        <!--数据的双向绑定-->
        <input type="text" v-model="name" placeholder="你的名字">
        <!--"{{}}文本插值方法，会自动将我们双向绑定的数据实时显示出来"-->
        <h1>你好，{{name}}</h1>
    </div>
<script src="https://unpkg.com/vue/dist/vue.min.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            name: 'Robert'
        },
        created: function (){
            //this指向的是调用它的实例
            console.log(this.name)
        },
        mounted:function () {
            console.log(this.$el)
        }
    })
</script>
</body>
</html>
